#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 105;

int n, W;
struct Node {
  int x, id;
  bool operator<(const Node& o) const {
    if (x != o.x)
      return x < o.x;
    else
      return id < o.id;
  }
} a[N];

void solve() {
  cin >> n >> W;
  int sum = 0;
  rep(i, 1, n) {
    cin >> a[i].x;
    a[i].id = i;
    sum += a[i].x;
  }
  sort(a + 1, a + n + 1);
  if (W < 1 || W > sum || n == 1 && W != sum || W == 1 && a[1].x > 1) {
    cout << "No";
    return;
  }
  cout << "Yes" << endl;
  if (W == 1) {
    cout << a[1].id << ' ';
    rep(i, 2, n) rep(j, 1, a[i].x * 2) cout << a[i].id << ' ';
    cout << a[1].id << ' ';
  } else if (a[n].x <= W) {
    int cnt = 0, need = W - a[n].x;
    rep(i, 1, n - 1) {
      rep(j, 1, a[i].x) {
        if (cnt == need) cout << a[n].id << ' ';
        cout << a[i].id << ' ' << a[i].id << ' ';
        cnt++;
      }
    }
    if (cnt == need) cout << a[n].id << ' ';
    rep(i, 1, a[n].x * 2 - 1) cout << a[n].id << ' ';
  } else {
    cout << a[1].id << ' ';  // save y = 0
    int drop = a[n].x - W + 1;
    rep(i, 1, drop * 2) cout << a[n].id << ' ';
    cout << a[1].id << ' ';  // load y = 1
    cout << a[n].id << ' ';  // save y = 1
    a[1].x--;
    rep(i, 1, n - 1) rep(j, 1, a[i].x * 2) cout << a[i].id << ' ';
    rep(i, drop * 2 + 2, a[n].x * 2) cout << a[n].id << ' ';
  }
  return;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}